<template>
  <el-dialog
    title="提款账号"
    :visible.sync="visible"
    class="bankCard-dialog"
    :close-on-click-modal="false"
    :before-close="handleCloseDialog"
    width="960px"
  >
    <div class="table-container bankCard-container">
      <el-table
        ref="adminTable"
        size="mini"
        :data="list"
        style="width: 100%;"
        v-loading="listLoading"
        border
      >
        <el-table-column label="提款方式" width="200px" align="center">
          <template slot-scope="scope">{{ scope.row.method }}</template>
        </el-table-column>
        <el-table-column label="币种" align="center">
          <template slot-scope="scope">{{ scope.row.currency }}</template>
        </el-table-column>
        <el-table-column label="钱包地址" align="center">
          <template slot-scope="scope">{{ scope.row.address }}</template>
        </el-table-column>
        <el-table-column label="网络" align="center">
          <template slot-scope="scope">{{ scope.row.network }}</template>
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</template>
<script>
import { bankMemberInfo } from "@/api/member";
export default {
  name: "deductionDialog",
  data() {
    return {
      visible: true,
      loading: false,
      list: [],
      listLoading: false
    };
  },
  props: {
    row: {
      type: Object,
      default: {}
    }
  },

  mounted() {
    this.getList();
  },
  methods: {
    getList() {
      this.listLoading = true;
      bankMemberInfo({ memberId: this.row.id })
        .then(response => {
          this.listLoading = false;
          this.list = response.data;
        })
        .catch(() => {
          this.listLoading = false;
        });
    },
    handleCloseDialog() {
      this.$emit("handle-cancel");
    }
  }
};
</script>
<style lang="scss">
.bankCard-container {
  height: calc(100vh - 445px);
  .el-table__body-wrapper {
    height: calc(100vh - 445px);
    overflow-y: auto;
  }
}

.bankCard-dialog {
  .el-dialog__body {
    height: 60vh !important;
  }
}
</style>
